<template>
	<view class="content">
		<view class="contenta">
			<view class="title">循环滚动列表，支持小程序、h5、app</view>
			<view class="titlea">支持slot自定义内容</view>
			<view class="scroll_list">
				<scrollList :list="goods_list">
					<template v-slot:scrollArr="{scroll_list}">
						<view class="">
							<view class="scroll_lists" v-for="item in scroll_list" :key="item.id">
								<view class="user_name">{{item.name}}</view>
								<view class="_text">54分钟前登录</view>
							</view>
						</view>
					</template>
				</scrollList>
			</view>
		</view>
	</view>

</template>

<script>
	import scrollList from '@/components/zh-scrollList/scrollList/scrollList'
	export default {
		components: {
			scrollList
		},
		data() {
			return {
				goods_list: [
					{
					id: 1,
					name: '用户1'
				}, 
				{
					id: 2,
					name: '用户2'
				}, 			{
					id: 3,
					name: '用户3'
				}, 			{
					id: 4,
					name: '用户4'
				}, 			{
					id: 5,
					name: '用户5'
				}, 			{
					id: 6,
					name: '用户6'
				}, 			{
					id: 7,
					name: '用户7'
				}, 			{
					id: 8,
					name: '用户8'
				}, 			{
					id: 9,
					name: '用户9'
				}, 			{
					id: 10,
					name: '用户10'
				}, 
				]
			}
		},

		onLoad() {

		},
		onShow() {

		},
		methods: {

		},
		computed: {

		},
		watch: {

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background-color: #fff;
		min-height: 100vh;

		.contenta {
			padding: 24upx;

			.title {
				text-align: center;
				margin-bottom: 10upx;
				font-size: 30upx;
				color: #333;
				font-weight: bold;
			}

			.titlea {
				text-align: center;
				margin-bottom: 20upx;
				font-size: 26upx;
				color: #333;
				font-weight: bold;
			}

			.scroll_list {
				padding: 0 24upx;

				.scroll_lists {
					display: flex;
					align-items: center;
					justify-content: space-between;

					.user_name {
						font-size: 24upx;
						color: #333;
					}

					._text {
						color: #999;
						font-size: 24upx;
					}
				}
			}
		}
	}
</style>
